package com.achobeta.recruitment.utils;

import com.achobeta.recruitment.button.Button;
import com.achobeta.recruitment.button.ext.ClickButton;
import com.achobeta.recruitment.button.ext.PicPhotoOrAlbumButton;
import com.achobeta.recruitment.button.ext.SubButton;
import com.achobeta.recruitment.button.ext.ViewButton;

import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 马拉圈
 * Date: 2023-10-26
 * Time: 22:52
 */
public class ButtonUtils {

    public static Button createButton() {
        Button button = new Button();
        button.setButton(new ArrayList<>());
        return button;
    }

    public static ClickButton createClickButton(String name, String key) {
        ClickButton clickButton = new ClickButton(name);
        clickButton.setKey(key);
        return clickButton;
    }

    public static ViewButton createViewButton(String name, String url) {
        ViewButton viewButton = new ViewButton(name);
        viewButton.setUrl(url);
        return viewButton;
    }

    public static SubButton createSubButton(String name) {
        SubButton subButton = new SubButton(name);
        subButton.setSub_button(new ArrayList<>());
        return subButton;
    }
    public static PicPhotoOrAlbumButton createPicPhotoOrAlbumButton(String name, String key) {
        PicPhotoOrAlbumButton picPhotoOrAlbumButton = new PicPhotoOrAlbumButton(name);
        picPhotoOrAlbumButton.setKey(key);
        return picPhotoOrAlbumButton;
    }
}
